package sphere.view;

import java.awt.*;
import java.awt.Panel;
import java.awt.Label;
import java.awt.TextField;
import java.awt.GridLayout;
import java.awt.Frame;
import java.awt.event.*;


public class SphereWindow extends Frame {
	

		protected class Fermeture extends WindowAdapter {
		   public void windowClosing(WindowEvent e ){
		System.exit( 0 ) ;
		}
}

	Label l1,l2,l3;
	
	private TextField volume;
	private TextField rayon;
	private TextField surface;

	private TextField textSurface;

	private TextField textVolume;
	
	
	public SphereWindow(){
		
		
		
	Fermeture ferm = new Fermeture();
	this.addWindowListener(ferm);
	
	setLayout(new GridLayout(3,2,10,10));
	
	
	Panel p1 = new Panel();
	this.add(p1);
	p1.add(l1 = new Label("Radius"));
	
	Panel p2 = new Panel();
	this.add(p2);
	p2.add( new TextField("rayon"));
	
	Panel p3 = new Panel();
	this.add(p3);
	p3.add ( l2 = new Label ( "Volume" ) ) ;
	
	Panel p4 = new Panel();
	this.add(p4);
	p4.add( new TextField("volume"));
	
	Panel p5 = new Panel();
	this.add(p5);
	p5.add ( l3 = new Label ( "Surface" ) ) ;
	
	Panel p6 = new Panel();
	this.add(p6);
	p6.add( new TextField("surface"));
	//p1.add (p1 = new Panel());
	

	//affichageValeur = new Label;
	
	this.pack();
	this.setVisible(true);
	
		}
	
	public void setTextVolume(String textVolume) {
        this.textVolume.setText(textVolume);
}

public void setTextSurface(String textSurface) {
        this.textSurface.setText(textSurface);
}

}